﻿{extend name="layout/main-block" /}
{block name="sub-wrapper"}
    <!--内容容器-->
    <section id="sub-wrapper" class="full-screen page-videoLibrary">
        <!--数据展示容器-->
        <div id="sub-content">
            <div id="sub-header">
                <div class="sub-title">
                    <h3><i class="fa fa-video-camera-camera"></i>视频--视频库</h3>
                </div>
                <div class="sub-tools">
                    <div id="searchTool">
                        <form class="form-inline">
                            <input size="30" class="form-control" id="phname" placeholder="请输入视频名称进行检索" />
                            <a class="btn btn-primary" id="searchname"><i class="fa fa-search"></i>搜索</a>
                        </form>
                    </div>
                </div>
            </div>

            <div class="table-responsive data-table">
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <!-- <th class="text-center" width="34px">
                            <input type="checkbox" />
                        </th> -->
                        <th>ID</th>
                        <th>来源设备</th>
                        <th>设备名称</th>
                        <th>关联用户</th>
                        <th>上传时间</th>
                        <th>上传方式</th>
                        <th>时长</th>
                        <th>播放次数</th>
                        <th>播放</th>
                        <th>播放/存储路径</th>
                        <th>视频名称</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="video" id="v" empty="$empty" }
                    <tr>
                        <!-- <td class="text-center">
                            <input type="checkbox" />
                        </td> -->
                        <td>{$v.id}</td>
                        <td>{$v.sn}</td>
                        <td>{$v.name}</td>
                        <td>{$v.username}</td>
                        <td>{$v.created_at}</td>
                        {if condition = "$v.upload_mode eq '0'"}
                        <td>被动</td>
                        {elseif condition = "$v.upload_mode eq '1'"}
                        <td>主动</td>
                        {/if}
                        <td>{$v.duration}</td>
                        <td>{$v.count}</td>
                        <td><a class="btn btn-success btn-sm video-play" data-name="{$v.username}" data-videourl="{$v.url}"><i class="fa fa-play-circle"></i>播放</a></td>
                        <td>{$v.url|substr=0,10}</td>
                        <td>{$v.title}</td>
                        <td>
                            <ul class="record-tool">
                                <li><a class="btn btn-info btn-sm downLoad" data-name="{$v.id}" href="/admin/video_library/download?url={$v.url}" >下载</a></li>
                                <li><a class="btn btn-danger btn-sm delRecord" data-name="{$v.id}">删除</a></li>
                            </ul>
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="6" class="">
                            {$page}
                           <!-- <ul class="pagination">
                                <li>
                                    <a href="#" aria-label="Previous">
                                        <span aria-hidden="true">&laquo;</span>
                                    </a>
                                </li>
                                <li class="active"><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">...</a></li>
                                <li><a href="#">999</a></li>
                                <li>
                                    <a href="#" aria-label="Next">
                                        <span aria-hidden="true">&raquo;</span>
                                    </a>
                                </li>
                            </ul>-->
                        </td>
                        <td colspan="5" class="text-center">
                            <div class="table-summary">
                                <div class="input-group">
                                    <div class="input-group-addon">到第</div>
                                    <input type="text" class="form-control" id="goto" placeholder="" style="width:40px;">
                                    <div class="input-group-addon">页</div>
                                    <span class="input-group-btn">
                                                <a class="btn btn-primary" data-currentPage="{$currentPage}" data-lastPage="{$lastPage}" id="gotoPage"><i class="fa fa-arrow-right"></i>确定</a>
                                            </span>
                                </div>
                            </div>
                        </td>
                        <td colspan="2" class="text-center">
                            共<span id="total-record" class="text-success fa-2x"> {$count} </span>条记录
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>

        </div>
    </section>

{/block}

{block name="modal-video"}
<!--编辑工具-->
<div id="modal-video" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">用户:<span id="userName"></span></h4>
            </div>
            <!--<div class="modal-body">-->
                <div class="modal-body col-xs-12">
                    <video id="custom-video" controls="controls">
                    </video>
                </div>
                <div class="clearfix"></div>
           <!-- </div>-->
            <div class="modal-footer">
                <a class="btn btn-warning" data-dismiss="modal"><i class="fa fa-times"></i>关闭</a>
            </div>
        </div>
    </div>
</div>
<!--编辑工具-->
{/block}
{/block}


